package chixing.day19.work;

public class NewUserDiscount implements DiscountStrategy{
    public double applyDiscount(double originalPrice, User user, Product product)
    {
        if(user.isNewUser() && product.isAttend())
        {
            return originalPrice-20;
        }
        else
        {
            return originalPrice;
        }
    }
}
